<template>
  <!--此组件负责处理举报相关-->
<div>
  举报管理
  <table>
    <tr>
      <th>Id</th><th>举报者ID</th><th>被举报ID</th><th>类型</th><th>理由</th><th>处理状态</th><th>时间</th><th>操作</th>
    </tr>
    <tr v-for="item in reports">
      <td>{{item.id}}</td><td>{{item.reporterId}}</td><td>{{item.reportedId}}</td><td>{{item.reportType}}</td><td>{{item.reason}}</td><td>{{item.handleStatus}}</td><td>{{item.createTime}}</td><td><button @click="handle(item.id)">处理</button></td>
    </tr>
  </table>
</div>
</template>

<script>
export default {
  name: "Report",
  data(){
    return{
      reports:[],
    }
  },
  created(){
    //获取所有举报记录
    this.$http.get('/api/admin/getAllReport').then(res=>{
      this.reports = res.data.data.Report
    }).catch(error=>{
      console.log(error)
    })
  },

}
</script>

<style scoped>

</style>
